Adwaita: fix switch sizing
authorLapo Calamandrei <calamandrei@gmail.com>
Fri, 30 Oct 2015 11:53:44 +0000 (12:53 +0100)
committerLapo Calamandrei <calamandrei@gmail.com>
Fri, 30 Oct 2015 11:53:44 +0000 (12:53 +0100)
moving -GtkSwitch-slider-width and -GtkSwitch-slider-height from
the GtkSwitch selector to the * wildcard selector as other style
props.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index 05a0c05cf77960a7a54fae7284c67a73cd634baf..b2e5295bae6e14433745dac710832047003982a5 100644 (file)
@@ -1945,13 +1945,12 @@ notebook {
  * Switch *
  **********/
 
-GtkSwitch {
-  -GtkSwitch-slider-width: 45px; // 55px is the right value to make it as tall
-                                 // as buttons, not doing that for now
-  -GtkSwitch-slider-height: 27px;
-}
-
 switch {
+  @at-root * {
+    -GtkSwitch-slider-width: 45px;
+    -GtkSwitch-slider-height: 27px;
+  }
+
   font-weight: bold;
   font-size: smaller;
   outline-offset: -4px;
index 4ec0208942f4118a7dbb56ff4ee5bb849be3c340..8295dc09f36e79545a4bafd184d32ad9e1a179e7 100644 (file)
@@ -2478,10 +2478,6 @@ notebook {
 /**********
  * Switch *
  **********/
-GtkSwitch {
-  -GtkSwitch-slider-width: 45px;
-  -GtkSwitch-slider-height: 27px; }
-
 switch {
   font-weight: bold;
   font-size: smaller;
@@ -2492,6 +2488,9 @@ switch {
   color: #eeeeec;
   background-image: linear-gradient(to bottom, #2d3232);
   text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
+  * {
+    -GtkSwitch-slider-width: 45px;
+    -GtkSwitch-slider-height: 27px; }
   switch:active {
     background-image: linear-gradient(to bottom, #215d9c 2px, #266cb5);
     color: white;
index 641e295ac1012a246d87c261fbecc7b4fad8640b..5b1d9ae910757cd1999a7a84610e25e6786ecb7e 100644 (file)
@@ -2484,10 +2484,6 @@ notebook {
 /**********
  * Switch *
  **********/
-GtkSwitch {
-  -GtkSwitch-slider-width: 45px;
-  -GtkSwitch-slider-height: 27px; }
-
 switch {
   font-weight: bold;
   font-size: smaller;
@@ -2498,6 +2494,9 @@ switch {
   color: #2e3436;
   background-image: linear-gradient(to bottom, #cfcfcf);
   text-shadow: 0 1px rgba(0, 0, 0, 0.1); }
+  * {
+    -GtkSwitch-slider-width: 45px;
+    -GtkSwitch-slider-height: 27px; }
   switch:active {
     background-image: linear-gradient(to bottom, #4a90d9 2px, #63a0de);
     color: white;